import { useState } from "react";
import Screen from './Screen'
const Computer = () => {
    const [status, setStatus] = useState(false)
    const toggle = () => {
        setStatus(!status)
    }
    return (
        <div>
            Computer
            <button onClick={toggle}>开关</button>
            <Screen logo='明基' showContent={status ? '显示器亮了' : '显示器关了'}></Screen>
        </div>
    )
}
export default Computer